<script setup lang="ts">
defineProps<{
  colName: string
  data: { name: string, value: number }[]
}>()
</script>

<template>
  <ElTable stripe height="100%" class="energy-table" :data="data">
    <template #empty>
      <TableEmpty :image-size="100" class="energy-table-empty" />
    </template>
    <ElTableColumn label="时间" prop="name" />
    <ElTableColumn v-if="colName" :label="colName" prop="value" />
  </ElTable>
</template>

<style lang="scss" scoped>
.energy-table {
  :deep(.el-table__inner-wrapper:before) {
    display: none;
  }
}
:deep(.energy-table-empty) {
  --el-empty-image-width: 60px;
  line-height: 1.5;
}
</style>
